//1、导入vue
import Vue from 'vue';
//1、导入路由  vue-router
import VueRouter from 'vue-router';
Vue.use(VueRouter);   //2、放进去
import home from './components/tabbar/home.vue';    //5、导进来
import member from './components/tabbar/member.vue';
import cart from './components/tabbar/cart.vue';
import search from './components/tabbar/search.vue';
import supermaket from './components/tabbar/supermaket.vue';
import { Navbar, TabItem } from 'mint-ui';
Vue.component(Navbar.name, Navbar);
Vue.component(TabItem.name, TabItem);
var router = new VueRouter({       //3、new一个路由
    routes:[
        {path:'/',redirect:'/home'},   //重定向
        {path:'/home',component:home},  //4、引入路径
        {path:'/member',component:member},
        {path:'/cart',component:cart},
        {path:'/search',component:search},
        {path:'/home/supermaket',component:supermaket},
    ],
    linkActiveClass:'mui-active'    //高亮显示
});

export default  router;
